package com.evil.application.pojo.dto.form.control.code;

import com.evil.application.pojo.entity.ApplicationFormControl;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 数字框-表单控件实体
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class NumberControlDTO extends ControlDTO {

    public static final String[] ignoreProperties = new String[]{};

    /**
     * 数值显示格式(0:无, 1:千分符, 2:百分比)
     */
    private Integer decimalFormat;
    /**
     * 最小值
     */
    private BigDecimal minDecimal;
    /**
     * 最大值
     */
    private BigDecimal maxDecimal;
    /**
     * 占位符
     */
    private String placeholder;
    /**
     * 步进
     */
    private Integer step;
    /**
     * 计数器是否严格步进(0:否, 1:是)
     */
    private Integer stepStrictly;
    /**
     * 步进按钮位置(右侧：right)
     */
    private String controlsPosition;
    /**
     * 可以输入小数(0:否, 1:是)
     */
    private Integer decimalStatus;
    /**
     * 小数位
     */
    private Integer decimalAccuracy;
    /**
     * 限制数值范围(0:否, 1:是)
     */
    private Integer decimalLimitScope;

    /**
     * 是否开启币种方式(0:否, 1:是)
     */
    private Integer currencyStatus;

    /**
     * 币种
     */
    private String currencyCode;

    public NumberControlDTO(ApplicationFormControl applicationFormControl) {
        super(applicationFormControl, ignoreProperties);
    }
}
